<template>
	<view :class="[primarySize()]">
		<scroll-view scroll-x class="nav" v-if="businessList.length>0" >
			<navigator v-for="(item,index) in businessList" hover-class="none" :url="'/pages/user/company_info?id='+item.id" class="business_item">
				<image :src="cdnurl(item.enterpriseinfo.logo)||'https://admin.mosizp.cn/static/public/business_logo.png'"
					class="business_img" mode="aspectFit"></image>
				<view class="business_tit m-ellipsis-l2">
					{{item.enterpriseinfo.full_name||item.enterpriseinfo.company_name}}</view>
				<view class="business_info m-ellipsis-l2">{{item.industry_category_name}}</view>
			</navigator>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		name: "business-list",
		props: {
			businessList: { // 属性名
				type: Array,
				value: []
			},
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss" scoped>
	.nav{
		width: 100%;
		height: 262rpx;
	}
	.business_item {
		width: calc((100% - 36rpx) / 3);
		margin-right: 18rpx;
		text-align: center;
		box-shadow: 0px 1rpx 18rpx 0px rgba(0, 0, 0, 0.06);
		border: 1rpx solid #ebebeb;
		background-color: #fff;
		padding: 15rpx 18rpx;
		display: inline-block;
		vertical-align: top;
	}

	.business_item:nth-child(3n) {
		margin-right: 0
	}

	.business_tit {
		font-size: 26rpx;
		color: #333333;
		line-height: 30rpx;
		height: 60rpx;
	}

	.business_info {
		font-size: 24rpx;
		color: #999999;
		margin-top: 15rpx;
		line-height: 26rpx;
		height: 52rpx;
	}

	.business_img {
		width: 134rpx;
		height: 90rpx;
		display: block;
		margin: 0 auto 15rpx;
	}


	/* 组件 - flex */
	.m-list-flex {
		display: flex;
		align-items: center;
	}

	.m-list-flex .m-cell-bd {
		-webkit-box-flex: 1;
		-webkit-flex: 1;
		flex: 1;
		overflow: hidden;
	}
</style>